home *** CD-ROM | disk | FTP | other *** search
Wrap
Text File | 1996-11-11 | 42.0 KB | 1,582 lines
; $Id: InstallThor 1.4 1996/11/06 19:13:57 pettern Exp pettern $ ;************************************************************************* ; Title: ; InstallThor ;************************************************************************* ; Description: ; Commodore Installer Script for the Thor 2.4 software ;************************************************************************* ; Author: ; Øyvind Ellefsen - versions for THOR upto 1.22 ; Petter Nilsen - versions for 1.25 -> ; - parts borrowed from the Demon ISP installer for THOR 2.3 ; created by Neil Bothwick <neil@wirenet.u-net.com> ; - intro borrowed from Robert Reiswig's CyberGfx installer ;************************************************************************* ; Still to do: ; - Show .readme file ; - Warn against MultiUser ; - Make sure all dirs are present before copying files ; ;************************************************************************* ; ;****************************************************** ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ****** ;****************************************************** ; some useful variables (set true 1 false 0 yes true no false is_a_file 1 is_a_dir 2 quote "\"" newline "\n" tick "'" nothing "" dldirproblem 0 bbspack 0 inetpack 0 #inetpackname "thor24_inet.lha" #bbspackname "thor24_bbs.lha" #arexxpackname "thor24_arexx.lha" classact 0 tcptype 0 uucptype 0 cpu (database "cpu") cpu020 (and (<> cpu "68000") (<> cpu "68010")) v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39) #installtext (cat "This section of the installation is dedicated " "to some first-time parameters that THOR " "needs to have configured.\n\n" "Select YES if you want to continue with this " "configuration, otherwise NO") #endtcpcfgtext (cat "After this installation is complete, start THOR " "and then select ConnectTHOR from the External menu.\n" "Press SendEvents in the ConnectTHOR window and " "a list of newsgroups will be collected (this will take a while).\n" "Afterwards, you can enter you Internet system in THOR and select " "Join from the Events menu to subscribe (Join) newsgroups.\n" "Another SendEvents in ConnectTHOR will make sure you are subscribed " "to these groups.") #exedtbug (cat "exe.datatype is installed on this machine. This datatype has a bug " "that might caused problems in the datatype filetype recognition " "in THOR on attached files.\nWe recommend that it is removed.\n\n" "Would you like to delete it now?") ) ; some useful procedures ; change userlevel to expert (procedure expert_level ( (user 2) ) ) ; reset userlevel back to default (procedure default_level ( (user default-level) ) ) ; store off userlevel (procedure save_default_level ( (set default-level @user-level) ) ) ; some overused strings (set #omp (cat "One moment please..." newline)) (set #classact "\n\n\nThe following is the default Install/Update Installer\n\nProcedure for placing ClassAct on your System.") ;******************************************************************** ; ClassAct Install/Update Default Procedure by: ; Osma Ahvenlampi - Osma.Ahvenlampi@hut.fi ;******************************************************************** ; $VER: ClassAct_Install 1.8 (12.10.96) by Osma Ahvenlampi (set cpu (database "cpu")) (set cpu020 (and (<> cpu "68000") (<> cpu "68010"))) (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39)) ; percentage of the size of included ClassAct classes versus the whole ; distribution (ie. total "complete" percentage after ClassAct is installed) (set classact-complete 50) (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)") (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. " (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.") (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.") ) ) ) (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?") (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.") (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.") (set #creating-dir "Creating directory ") (set #usbackup-prompt "User-Startup will now be backed up.") (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old") (set #adding-1 "Adding ") (set #adding-2 " to LIBS: assign\n") (set #adding-help "This is necessary so that the custom classes can be found.") (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?") (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.") (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.") (set #caprefs-message "ClassAct has several user-configurable aspects that affect the look of ClassAct interfaces.\n\nThese settings can be changed using the ClassAct preferences tool that will be installed in yout Prefs drawer.\n\nA small tool, CAPrefs, will be added to your user-startup to load the settings on reboot.") (set #caprefs-startup-1 "Adding the command\n\n") (set #caprefs-startup-2 "\n\nTo your s:User-Startup.") (set #decompressing-classact "Compressed ClassAct distribution detected\n\nDecompressing to RAM:") (set #deleting-cltmp "Deleting temporary files") (procedure install-classact ; call this procedure to copy the classes included in the Classes directory ; in your distribution dir. (if (exists "ClassAct.lha") ; ClassAct is compressed - need to decompress first ( ; Distribution includes LHEX (working (cat #decompressing-classact)) ; ClassAct.lha contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct" (run "lhex -aqfw=ram:ClassAct/ x ClassAct.lha") (set @classact-source "RAM:ClassAct") ) (set @classact-source (pathonly @icon)) ) (if (exists "ClassAct.lzx") ; ClassAct is compressed - need to decompress first ( ; Distribution includes UNLZX (working (cat #decompressing-classact)) ; ClassAct.lzx contains paths/files "Classes/*", "C/CheckAssign", "Prefs/CAPrefs" and "Prefs/ClassAct" (run "unlzx -amq x ClassAct.lzx ram:ClassAct/") (set @classact-source "RAM:ClassAct") ) (set @classact-source (pathonly @icon)) ) (if (exists (tackon @classact-source "Classes")) ; The archive contains a ClassAct library update. ( (set comp-dest (/ (* classact-complete 2) 10)) (set comp-libs (/ (* classact-complete 3) 10)) (set comp-dirs (/ (* classact-complete 4) 10)) (set comp-junod (/ (* classact-complete 5) 10)) (set comp-020 (/ (* classact-complete 6) 10)) (set comp-gad (/ (* classact-complete 7) 10)) (set comp-im (/ (* classact-complete 8) 10)) (set comp-prefs (/ (* classact-complete 9) 10)) ; has the user installed ClassAct in CLASSACT: ? (set @classact-dest (getassign "CLASSACT" "A")) (if (= @classact-dest "") (set @classact-dest "SYS:Classes")) ; is ClassAct already in SYS:Classes ? (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq))) (= @user-level 2)) ; no, ask where it should be placed (set @classact-dest (askdir (prompt #classdest-prompt) (help #classdest-help) (default @classact-dest) (newpath) ) ) ) (complete comp-dest) (if (<> (run (cat (tackon @classact-source "C/CheckAssign") " LIBS: " @classact-dest)) 0) ( (message #noclasses-message) (if (not (exists @classact-dest)) (makedir @classact-dest (prompt (cat #creating-dir @classact-dest))) ) (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n")) (startup "CLASSACT" (command @addassign) (prompt (cat #adding-1 @classact-dest #adding-2)) (help #adding-help) ) (run (@addassign)) ) ) (complete comp-libs) (set @classact-gadgets (tackon @classact-dest "Gadgets")) (set @classact-images (tackon @classact-dest "Images")) (if (not (exists @classact-gadgets (noreq))) (makedir @classact-images (prompt (cat #creating-dir @classact-gadgets)) ) ) (if (not (exists @classact-images (noreq))) (makedir @classact-images (prompt (cat #creating-dir @classact-images)) ) ) (complete comp-dirs) (if (exists "SYS:Classes/Gadgets/button.gadget") (if (and (= 2752514 (getversion "SYS:Classes/Gadgets/button.gadget")) (= 4868 (getsize "SYS:Classes/Gadgets/button.gadget"))) (if (askbool (prompt #junod-button) (help @askbool-help) (default 1)) ( (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42") (message #junod-backed) ) (message #junod-kept) ) ) ) (complete comp-junod) (if (and (and cpu020 v39) (exists (tackon @classact-source "Classes/Gadgets/layout.gadget.020"))) (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default 1))) (set classes-020 0) ) (complete comp-020) (set @source-path (tackon @classact-source "Classes/Gadgets")) (foreach @source-path "#?.gadget" ( (set thislib (tackon @source-path @each-name)) (if (and classes-020 (exists (cat thislib ".020"))) (set thislib (cat thislib ".020")) ) (copylib (source thislib) (dest @classact-gadgets) (newname @each-name) (prompt (cat #installing @each-name)) (help #classdest-help) (optional "force" "askuser") ) ) ) (complete comp-gad) (set @source-path (tackon @classact-source "Classes/Images")) (foreach @source-path "#?.image" ( (set thislib (tackon @source-path @each-name)) (if (and classes-020 (exists (cat thislib ".020"))) (set thislib (cat thislib ".020")) ) (copylib (source thislib) (dest @classact-images) (newname @each-name) (prompt (cat #installing @each-name)) (help #classdest-help) (optional "force" "askuser") ) ) ) (complete comp-im) (set @source-path (tackon @classact-source "Classes")) (foreach @source-path "#?.class" ( (set thislib (tackon @source-path @each-name)) (if (and classes-020 (exists (cat thislib ".020"))) (set thislib (cat thislib ".020")) ) (copylib (source thislib) (dest @classact-dest) (newname @each-name) (prompt (cat #installing @each-name)) (help #classdest-help) (optional "force" "askuser") ) ) ) ) ) (if (exists (tackon @classact-source "Prefs/ClassAct")) ; The archive contains ClassAct prefs tools ( (message #caprefs-message) (copylib (source (tackon @classact-source "Prefs/CAPrefs")) (dest "C:") (prompt (cat #installing "CAPrefs")) ) (copylib (source (tackon @classact-source "Prefs/ClassAct")) (dest "SYS:Prefs") (prompt (cat #installing "ClassAct Prefs")) (infos) ) (complete comp-prefs) (if (not (exists "ENVARC:ClassAct" (noreq))) ( (makedir "ENVARC:ClassAct" (prompt (cat #creating-dir "ENVARC:ClassAct")) ) (textfile (dest "ENVARC:ClassAct/ClassAct") (append "") ) ) ) (set caprefs-cmd "C:CAPrefs >NIL:\n") (startup "CAPREFS" (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2)) (help #caprefs-message) (command caprefs-cmd) ) ) ) (if (exists "ClassAct.lha") (delete "RAM:ClassAct" (all) (prompt #deleting-cltmp) ) ) (complete classact-complete) ) ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE ; ************** TO YOUR CLASSACT APPLICATION INSTALLER. ; --------------------------------------------------------------------------- (procedure set_dl_dir (set DL_Dir (expandpath DL_Dir)) ; verify that the download directory exists (if (<> (exists DL_Dir) is_a_dir) ( (makedir DL_Dir (prompt "The directory you have selected for download " "directory does not seem to exist.\n\n" "Do you want it to be created for you?") (help @makedir-help) (infos) (confirm) ) ) ) (if (<> DL_Dir "") (if (= (exists DL_Dir) is_a_dir) ( (set dlstr (cat dlstr "sys:rexxc/rx THOR:rexx/bbsread/cfgglobal.br DNL " quote DL_Dir quote)) (run dlstr) (run dlstr) ) ) ) (if (patmatch '#? #?' DL_Dir) (set dldirproblem 1) ) ) (procedure set_ul_dir (set UL_Dir (expandpath UL_Dir)) ; verify that the upload directory exists (if (<> (exists UL_Dir) is_a_dir) ( (makedir UL_Dir (prompt "The directory you have selected for upload of " "reply packets does not seem to exist.\n\n" "Do you want it to be created for you?") (help @makedir-help) (infos) (confirm) ) ) ) (if (<> UL_Dir "") (if (= (exists UL_Dir) is_a_dir) ( (set ulstr (cat ulstr "sys:rexxc/rx THOR:rexx/bbsread/cfgglobal.br UPL " quote UL_Dir quote)) (run ulstr) ) ) ) ) (procedure create_inet_system (set systemname (askstring (prompt "Please enter the name of the Internet system. " "This is the name used internally in THOR. ") (help "This information is needed to configure a new system " "for use in THOR. ") (default "Internet") ) ) (set UserName (if (exists 'ENV:USERNAME' (noreq)) (getenv 'USERNAME') (if (exists 'ENV:USER' (noreq)) (getenv 'USER') 'username' ) ) ) (set UserName (askstring (prompt "If you get mail using SMTPd or a similar program, " "please enter your user name now (which is also " "the name of the mailfile). If you want to use " "THOR's POP client for collecting mail, you can " "leave this blank.") (help "This information is only needed if you get mail " "by some other means than the method THOR supports " "(eg. using SMTPd).") (default UserName) ) ) (if (= UserName "") ( ; Then (set sysstr (cat sysstr "sys:rexxc/rx THOR:rexx/bbsread/cfgbbs.br BBSNAME " quote systemname quote " TYPE TCP")) ) ( ; Else (set sysstr (cat sysstr "sys:rexxc/rx THOR:rexx/bbsread/cfgbbs.br BBSNAME " quote systemname quote " GRAB " quote UserName quote " TYPE TCP")) ) ) (run sysstr) ) (procedure WAITX (set X 1) ( (while (< X 100) (set X (+ X 1)) ) ) ) (working "\n\n\n\n\n\n\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\n\nTHOR 2.4") (WAITX) (working "\n\n\nTHOR 2.4") (WAITX) (working "\n\nTHOR 2.4") (WAITX) (working "\n\nTHOR 2.4") (WAITX) (working "\nTHOR 2.4") (WAITX) (working "\nTHOR 2.4") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\n\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\nby") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\n\n\n\n\n\n\nUltima Thule Software") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\n\n\n\n\n\nUltima Thule Software") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\n\n\n\n\nUltima Thule Software") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\n\n\n\nUltima Thule Software") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\n\n\nUltima Thule Software") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\n\nUltima Thule Software") (WAITX) (working "\nTHOR 2.4\n\n\nby\n\n\nUltima Thule Software") (WAITX) (message "\n\n\nTHOR 2.4\n\n\nby\n\n\nUltima Thule Software") (WAITX) (welcome) ; first reset the user level so that the novice can see what's going on (save_default_level) (expert_level) ;Make assign to install from (makeassign "Thor_Install" "" (safe)) ;****************** ;** Check Memory ** ;****************** (run "Avail flush") (set Running (run "Thor_Install:CheckForLib")) (while (= Running 20) ( (Message newline "Thor seem to be running, you MUST close it NOW." newline "If you don't, the installation will fail!") (run "Avail flush") (set Running (run "Thor_Install:CheckForLib")) ) ) ;************************ ;** Start Installation ** ;************************ (if (exists "Thor:libs/bbsread.library" (noreq)) ( ; Then (set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.") (abort end_text) ) ) (if (exists "BBSData:global.config" (noreq)) ; Then ((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.") (abort end_text)) ) (if (exists "envarc:THOR/BBSDataPath" (noreq)) ( (if (askbool (prompt "THOR seems to be already installed, " "do you want to install it again from scratch?") (help "The installer script has found a previous " "installation of THOR.\n\n" "Select YES if you want it install again, otherwise NO") (default 1) ) ; Then ( (delete "envarc:thor" (all)) (delete "env:thor" (all)) (run "delete env:thor all force") (run "delete envarc:thor all force") ) ; Else ( (set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.") (abort end_text) ) ) ) ) (set Thor_Dir (askdir (prompt "Where would you like Thor installed?" newline "The installer will NOT create a directory!") (help @askdir-help) (default "Work:") (newpath) ) ) (set Thor_Dir (expandpath Thor_Dir)) ; before we go on lets reset the user's level back to what it was (default_level) ; verify that the Thor directory exists (if (<> (exists Thor_Dir) is_a_dir) ( (makedir Thor_Dir (prompt "The directory you have selected for Thor does not " "seem to exist. Do you want us to create it for you?" ) (help @makedir-help) (infos) (confirm) ) ) ) ; Create directories for the THOR installation (makeassign "Thor" Thor_dir) (makedir "Thor:Data") (makeassign "BBSData" "Thor:data") ;*********************************** ;***** GET FIRST DISK IN HERE ****** ;*********************************** ; first copy over the stuff (working #omp "Decompressing and copying Thor files.") (run "Thor_Install:lha -a x Thor_Install:thor.lha THOR:" ) ;************************ ;** Copy the keyfile ** ;************************ (if (exists "Thor_Install:THOR.key" (noreq)) ; Then (copyfiles (source "Thor_Install:THOR.key") (dest "THOR:") (nogauge) ) ) ;***************************************** ;** Copy the default arexx macro file ** ;***************************************** (if (exists "Thor_Install:THOR.macros" (noreq)) ; Then (copyfiles (source "Thor_Install:THOR.macros") (dest "THOR:") (nogauge) ) ) (default_level) ;*********************************** ; Create the environment variables * ;*********************************** (set Running (run "Thor:bin/basemanager convert")) (if (<> 0 Running) ( ((set end_text "Basemanager failed in setting up the env-variables.") (abort end_text)) ) ) ;****************** ;** Locale stuff ** ;****************** (default_level) (set catalog (askoptions (prompt "What languages would you like to install ?\n" "English is the built-in language.") (help "This will install locale files for other languages than English. " "You can set the prefered language on Workbench and in Thor by" "using the Sys:Prefs/Locale tool." newline @askchoice-help ) (choices "Norsk" "Dansk" "Svenska" "Deutsch" "Français" "Italiano" "Nederlands") (default 0) ) ) (makedir "thor:catalogs") (if (bitand 1 catalog) (copyfiles (source "Thor_Install:catalogs/norsk") (dest "thor:catalogs/norsk") (all) ) ) (if (bitand 2 catalog) (copyfiles (source "Thor_Install:catalogs/dansk") (dest "thor:catalogs/dansk") (all) ) ) (if (bitand 4 catalog) (copyfiles (source "Thor_Install:catalogs/svenska") (dest "thor:catalogs/svenska") (all) ) ) (if (bitand 8 catalog) (copyfiles (source "Thor_Install:catalogs/deutsch") (dest "thor:catalogs/deutsch") (all) ) ) (if (bitand 16 catalog) (copyfiles (source "Thor_Install:catalogs/français") (dest "thor:catalogs/français") (all) ) ) (if (bitand 32 catalog) (copyfiles (source "Thor_Install:catalogs/italiano") (dest "thor:catalogs/italiano") (all) ) ) (if (bitand 64 catalog) (copyfiles (source "Thor_Install:catalogs/nederlands") (dest "thor:catalogs/nederlands") (all) ) ) ;********************* ;** reqtools.libary ** ;********************* (copylib (prompt "Copying ReqTools library") (help "This will copy the ReqTools library." newline @copylib-help) (source "Thor_Install:reqtools.library") (dest "libs:") (confirm) ) ;*********** ;** Fonts ** ;*********** (copyfiles (prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" ) (help "This will copy the default font files for Thor." newline @copyfiles-help) (source "Thor_Install:Fonts") (dest "Fonts:") (fonts) (choices "Grn" "Thin609" "Thin611" "Thin711") ) ;************************************** ;* Install the bbsread database stuff * ;************************************** (set failed (run "thor:bin/initarc")) (if (<> 0 failed) ( ((set end_text "Installation failed.\nIf you received any error message,\nplease write this down and send us\na mail about the problem.") (abort end_text)) ) ) (run "thor:bin/InitCharsets") (expert_level) (set defpath (pathonly @icon)) (if (askbool (prompt newline "Would you like to install the optional ARexx " "scripts for THOR? " (help newline "This section of the installation is dedicated " "to installation of some optional ARexx scripts.\n\n " "Select YES if you want to continue with this " "installation, otherwise NO")) (default 1) ) ; Then ( (set isthere 20) (while (= 20 isthere) (set arexxfile (askfile (prompt (cat "Please select the ARexx archive for THOR 2.4\n" "(Usually named '"#arexxpackname"').\n\n" "It will be unarchived automatically.")) (help @askfile-help) (default (tackon defpath #arexxpackname)) ) ) ; verify that the file exists (if (exists arexxfile) ( (set isthere 0) (set defpath (pathonly arexxfile)) (set runfile3 (cat runfile3 "Thor_Install:lha -a x " quote arexxfile quote " Thor:rexx/")) (set failed (run runfile3)) (if (<> 0 failed) ( ((set failed_text "Unarchiving of the ARexx archive failed.") (message end_text)) ) ) ) ; else ( (if (askbool (prompt "File doesn't exist.\n\nDo you want to try again?" (default 1) (help "YES to select the correct file, or NO to continue without installing this archive.") ) ) ; Then ( (set isthere 20) ) ; Else ( (set isthere 0) ) ) ) ) ) ) ) (if (exists "Thor_Install:bin/parseqwk" (noreq)) ; Then ( (set bbspack 1) ) ; Else ( (if (askbool (prompt newline "Would you like to install the modules for " "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen " "to be used with Bulletin Board Systems?\n\n " "(you will be able to select which modules to " "install later in this installation procedure).") (help newline "This section of the installation is dedicated " "to installation of some common formats " "required if you want to use THOR with BBSes.\n\n" "Select YES if you want to continue with this " "installation, otherwise NO") (default 1) ) ; Then ( (set isthere 20) (while (= 20 isthere) (set bbsfile (askfile (prompt (cat "Please select the BBS archive for THOR 2.4. " "(Usually named '"#bbspackname"').\n\n" "It will be unarchived automatically.")) (help @askfile-help) (default (tackon defpath #bbspackname)) ) ) ; verify that the file exists (if (exists bbsfile) ( (set isthere 0) (set defpath (pathonly bbsfile)) (set runfile (cat runfile "Thor_Install:lha -a x " quote bbsfile quote " Thor_Install:")) (set failed (run runfile)) (if (<> 0 failed) ( ((set failed_text "Unarchiving of the BBS archive failed.") (message end_text)) ) ; Else ( (set bbspack 1) ) ) ) ; else ( (if (askbool (prompt "File doesn't exist.\n\nDo you want to try again?" (default 1) (help "YES to select the correct file, or NO to continue without installing this archive.") ) ) ; Then ( (set isthere 20) ) ; Else ( (set isthere 0) ) ) ) ) ) ) ) ) ) (if (exists "Thor_Install:bin/gettcp" (noreq)) ; Then ( (set inetpack 1) ) ; Else ( (if (askbool (prompt newline "Would you like to install the modules for " "UUCP, SOUP, NNTP, SMTP and POP3 " "to be used with Internet?\n\n" "(you will be able to select which modules to " "install later in this installation procedure).") (help newline "This section of the installation is dedicated " "to installation of some common formats " "required if you want to use THOR with Internet.\n\n" "Select YES if you want to continue with this " "installation, otherwise NO") (default 1) ) ; Then ( (set isthere 20) (while (= 20 isthere) (set inetfile (askfile (prompt (cat "Please select the Internet archive for THOR 2.4\n" "(Usually named '"#inetpackname"').\n\n" "It will be unarchived automatically.")) (help @askfile-help) (default (tackon defpath #inetpackname)) ) ) ; verify that the file exists (if (exists inetfile) ( (set isthere 0) (set runfile2 (cat runfile2 "Thor_Install:lha -a x " quote inetfile quote " Thor_Install:")) (set failed (run runfile2)) (if (<> 0 failed) ( ((set failed_text "Unarchiving of the Internet archive failed.") (message end_text)) ) ; Else ( (set inetpack 1) ) ) ) ; else ( (if (askbool (prompt "File doesn't exist.\n\nDo you want to try again?" (default 1) (help "YES to select the correct file, or NO to continue without installing this archive.") ) ) ; Then ( (set isthere 20) ) ; Else ( (set isthere 0) ) ) ) ) ) ) ) ) ) (if (= bbspack 1) ( (set bbs_type (askoptions (prompt "Please select which BBS modules " "you want to install.") (help "What system type for BBS usage that should be " "installed can be selected here." ) (choices "QWK - Normal QWK" "Fido - Normal Fidonet" "BlueWave - Normal BlueWave" "ABBS - Normal ABBS" "ABBS_QWK - ABBS with QWK support" "MBBS - Normal MBBS" "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS" "Omen - Normal Omen" ) (default -1) ) ) (copyfiles (source "Thor_Install:scripts") (dest "THOR:scripts") (pattern "#?BBS#?") ) (if (bitand 1 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?QWK") ) (copyfiles (source "Thor_Install:s/cfgqwk") (dest "THOR:s") ) (execute "thor:s/cfgqwk") ) ) (if (bitand 2 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?FIDO") ) (copyfiles (source "Thor_Install:s") (dest "THOR:s") (pattern "cfgfido#?") ) (execute "thor:s/cfgfido") (execute "thor:s/cfgfido_export") ) ) (if (bitand 4 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?BLUE") ) (copyfiles (source "Thor_Install:s/cfgblue") (dest "THOR:s") ) (execute "thor:s/cfgblue") ) ) (if (bitand 8 bbs_type) ( (copyfiles (source "Thor_Install:bin/packambbs") (dest "THOR:bin") ) (copyfiles (source "Thor_Install:bin/parsemsg") (dest "THOR:bin") ) (copyfiles (source "Thor_Install:s/cfgabbs") (dest "THOR:s") ) (execute "thor:s/cfgabbs") ) ) (if (bitand 16 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?QWK") ) (copyfiles (source "Thor_Install:s/cfgabbs_qwk") (dest "THOR:s") ) (execute "thor:s/cfgabbs_qwk") ) ) (if (bitand 32 bbs_type) ( (copyfiles (source "Thor_Install:bin/packambbs") (dest "THOR:bin") ) (copyfiles (source "Thor_Install:bin/parsemsg") (dest "THOR:bin") ) (copyfiles (source "Thor_Install:s/cfgmbbs") (dest "THOR:s") ) (execute "thor:s/cfgmbbs") ) ) (if (bitand 64 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?hippo") ) (copyfiles (source "Thor_Install:s/cfghippo") (dest "THOR:s") ) (copyfiles (source "Thor_Install:s/cfgbbbs") (dest "THOR:s") ) (execute "thor:s/cfghippo") (execute "thor:s/cfgbbbs") ) ) (if (bitand 128 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?omen") ) (copyfiles (source "Thor_Install:s/cfgomen") (dest "THOR:s") ) (execute "thor:s/cfgomen") ) ) ) ) (if (= inetpack 1) ( (set bbs_type (askoptions (prompt "Please select which Internet modules " "you want to install.") (help "What system type for Internet usage that should be " "installed can be selected here." ) (choices "TCP/TCP_ONLINE - POP3, SMTP and NNTP" "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk" "UUCP - Normal UUCP" ) (default -1) ) ) (copyfiles (source "Thor_Install:libs/utnet.library") (dest "THOR:libs") ) (copyfiles (source "Thor_Install:bin/InitRFC") (dest "THOR:bin") ) (copyfiles (source "Thor_Install:scripts") (dest "THOR:scripts") (pattern "#?UQWK#?") ) (if (bitand 1 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?(UUCP|TCP)") ) (copyfiles (source "Thor_Install:") (dest "THOR:") (pattern "ConnectTHOR#?") ) (copyfiles (source "Thor_Install:s/cfgtcp") (dest "THOR:s") ) (copyfiles (source "Thor_Install:s/cfgtcp_online") (dest "THOR:s") ) (execute "thor:s/cfgtcp") (execute "thor:s/cfgtcp_online") (set classact 1) (set tcptype 1) ) ) (if (bitand 2 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?SOUP") ) (copyfiles (source "Thor_Install:s") (dest "THOR:s") (pattern "#?soup") ) (makedir "THOR:unix") (copyfiles (source "Thor_Install:unix") (dest "THOR:unix") (all) ) (execute "thor:s/cfguqwk_soup") (execute "thor:s/cfgsoup") ) ) (if (bitand 4 bbs_type) ( (copyfiles (source "Thor_Install:bin") (dest "THOR:bin") (pattern "#?UUCP") ) (copyfiles (source "Thor_Install:s/cfguucp") (dest "THOR:s") ) (execute "thor:s/cfguucp") (set uucptype 1) ) ) ) ) (if (= classact 1) ( (install-classact) ) ) ;***************************** ;****** Install icons ******** ;***************************** (set icon (askchoice (prompt "Please select what icon-set to install with THOR.\n") (help "If you use MagicWB on your Workbench, " "you might want to install the special MagicWB icons.\n\n" "Likewise, if you use NewIcons on your Workbench, " "you might want to install the special NewIcons icons.") (choices "Normal icons" "MagicWB icons" "NewIcons icons") (default 0) ) ) (if (= icon 1) ( (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons") (dest "Thor:") (pattern "~(THOR.guide.info)") (noposition) (nogauge) ) (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons/THOR.guide.info") (dest "Thor:Docs") (newname "THOR.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons/THOR.guide.info") (dest "Thor:Docs") (newname "ConfigTHOR.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons/THOR.guide.info") (dest "Thor:Docs") (newname "ARexx.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons/THOR.guide.info") (dest "Thor:Docs") (newname "BBSReadRexx.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons/THOR.guide.info") (dest "Thor:Docs") (newname "THOR_Rexx.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying MagicWB icon files") (source "Thor_Install:MWBIcons/THOR.guide.info") (dest "Thor:Docs") (newname "Installation.guide.info") (noposition) (nogauge) ) ) ) (if (= icon 2) ( (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons") (dest "Thor:") (pattern "~(THOR.guide.info)") (noposition) (nogauge) ) (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons/THOR.guide.info") (dest "Thor:Docs") (newname "THOR.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons/THOR.guide.info") (dest "Thor:Docs") (newname "ConfigTHOR.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons/THOR.guide.info") (dest "Thor:Docs") (newname "ARexx.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons/THOR.guide.info") (dest "Thor:Docs") (newname "BBSReadRexx.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons/THOR.guide.info") (dest "Thor:Docs") (newname "THOR_Rexx.guide.info") (noposition) (nogauge) ) (copyfiles (prompt "Copying NewIcons icon files") (source "Thor_Install:NewIcons/THOR.guide.info") (dest "Thor:Docs") (newname "Installation.guide.info") (noposition) (nogauge) ) ) ) (if (exists "env:sys/def_drawer.info" (noreq)) (copyfiles (prompt "Copying default drawer icon") (help "This will copy the default drawer icon." newline @copyfiles-help) (source "env:sys/def_drawer.info") (dest "Thor:") (newname "Docs.info") (noposition) (infos) ) ) (if (exists "sys:classes/datatypes/exe.datatype" (noreq)) (if (delete "sys:classes/datatypes/exe.datatype" (prompt #exedtbug) (help "The installer has found exe.datatype installed." "Select YES if you want it delete it, otherwise NO") (optional "force" "askuser" "infos") ) ) ; Then ( (delete "devs:datatypes/exe" (infos)) ) ) ;***************************** ;* Simple configuration here * ;***************************** (if (= tcptype 1) ; then ( (if (askbool (prompt newline "The following section in this installation " "is used for setting up parameters needed " "for use of the TCP types (POP3/NNTP/SMTP) " "for Internet mail and news. This configuration is optional " "but must be set later if you do not do this now.\n\n" "Do you want to proceed with this?") (help #installtext) (default 1) ) ; Then ( (set DL_Dir (askdir (prompt "Select default download directory." "This directory will be used for BBS message packets and " "downloads, SMTPd mailboxes and saving of MIME/uuencoded " "binaries. It can be changed in ConfigTHOR later on." (help @askdir-help) (default "Work:") (newpath) ) ) ) (set_dl_dir) (create_inet_system) (if (askbool (prompt newline "If you like to set up some parameters like your " "real name, newsserver, mailserver etc. you can " "do this now. " "Do you want to proceed with this?") (help #installtext) (default 1) ) ; Then ( (set typecfg (cat typecfg "THOR:bin/cfgtcp " quote systemname quote)) (set running (run typecfg)) (if (askbool (prompt newline "Would you like to order a list of available newsgroups " "from the configured newsserver for the next time you " "connect?") (help #installtext) (default 1) ) ; Then ( (set ConfigConf (cat '\nCONFIGCONF BBSNAME ' tick '"' systemname '"' tick ' CONFNAME ' tick '"EMail"' tick)) (set ConfList (cat 'WRITEBREVENT BBSNAME ' tick '"' systemname '"' tick ' EVENT EVE_CONFLIST\n')) (set adrcmd (cat 'address command 'quote'Thor:bin/LoadBBSRead'quote'\n')) (textfile (dest 't:getconflist.rexx') (append '/* Order a list of newsgroups */\n\n') (append adrcmd) (append 'WaitForPort BBSREAD\n') (append 'address BBSREAD\n') (append '\nEVE_CONFLIST = 6\n') (append ConfList) (append (cat ConfigConf ' REPLYSTRING ' tick '"Hello %N, on %D, you said,"' tick ' SET c2x(CDF_MARK_OWN_MSGS)')) (append (cat ConfigConf ' SET c2x(CDF_ALWAYS_REPLY_STR)')) (append (cat ConfigConf ' CLEAR c2x(CDF_BBS_KEEPTIME)')) (append (cat ConfigConf ' CLEAR c2x(CDF_BBS_KEEPMSG)')) (append (cat ConfigConf ' SET c2x(CDF_IGNORE_KEEPTIME)')) (append (cat ConfigConf ' SET c2x(CDF_IGNORE_KEEPMSG)')) (append (cat ConfigConf ' SET c2x(CDF_MEMBER_OF)')) (append (cat ConfigConf ' SET c2x(CDF_MAIL)')) (append '\n') ) (if (<> 0 (run 'rx t:getconflist.rexx')) (run 'sys:rexxc/rx t:getconflist.rexx') ) ) ) (message #endtcpcfgtext) ) ) ) ) ) ; else ( (if (askbool (prompt newline "The following section in this installation " "is used for setting up a download and an upload " "directory for message packets. This section is " "optional, but the directories needs to be " "set in THOR if you do not set them up here.\n\n" "Do you want to proceed with this?") (help #installtext) (default 1) ) ; Then ( (set DL_Dir (askdir (prompt "Where do you keep your downloaded message packets?\n\n" "This is usually the download directory " "configured in the communication program you " "use." (help @askdir-help) (default "Work:") (newpath) ) ) ) (set_dl_dir) (set UL_Dir (askdir (prompt "Where would you like to keep any reply " "message packets that THOR generates?\n\n" "This is usually the upload directory " "configured in your communication program." (help @askdir-help) (default "Work:") (newpath) ) ) ) (set_ul_dir) ) ) ) ) ;***************************** ;***** WE ARE ALMOST DONE **** ;***************************** ; make sure that default-dir is pointing to the right place (set @default-dest Thor_Dir) (makeassign "Thor_Install") (makeassign "BBSData") (makeassign "Thor_Disk" (safe)) (if (= dldirproblem 1) (message (cat "There was a problem configuring the download directory.\n\n" "Please configure this manually in THOR.")) ) ; final message for our viewers (set end_text (cat "Hope you like THOR! Don't hesitate to " "send us comments, bugreports and suggestions.")) ; now for the exit (exit end_text)